package fhp.hlhj.giantfold.presenter

import java.lang.ref.WeakReference

/**
 * author: FHP
 * data: on 2017\11\29 0029 17:15
 * E-Mail: 103945089@qq.com
 */
/**
 * t  接口泛型
 */
abstract class BasePresenter<T> {
    protected  var mRefer:WeakReference<T>?=null
     fun attachView(view: T){
        mRefer=WeakReference(view)
    }
     fun  detachView(){
        if (mRefer!=null){
            mRefer?.clear()
            mRefer=null
        }
    }
    abstract fun fetchData()
}